import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import {PersonagePageResult, PersonageQuery,Personage} from "@/api/occupant-person/types";
/**
 * 下单端-个人用户查询
 * @param queryParams 
 */
export function listPersonagePages(queryParams: PersonageQuery): AxiosPromise<PersonagePageResult> {
  return request({
    url: '/web/casualPersonage/pages',
    method: 'get',
    params: queryParams,
  });
}
/**
 * 下单端-个人用户新增
 * @param queryParams 
 */
export function casualPersonageAdd(queryParams: Personage): AxiosPromise<PersonagePageResult> {
  return request({
    url: '/web/casualPersonage/add',
    method: 'post',
    data: queryParams,
  });
}
/**
 * 下单端-个人用户修改
 * @param queryParams 
 */
export function casualPersonageEdit(queryParams: Personage): AxiosPromise<PersonagePageResult> {
  return request({
    url: '/web/casualPersonage/edit',
    method: 'post',
    data: queryParams,
  });
}
/**
 * 下单端-个人用户删除
 * @param queryParams 
 */
export function casualPersonageDel(id: number|string): AxiosPromise<PersonagePageResult> {
  return request({
    url: '/web/casualPersonage/del?id='+id,
    method: 'get',
  });
}